﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAO;
using DTO;

namespace BUS
{
    public class ChiTietHoaDonBUS
    {
        ChiTietHoaDonDAO cthdDAO = new ChiTietHoaDonDAO();

        public List<ChiTietHoaDonDTO> LayDanhSachChiTietHoaDon()
        {
            return cthdDAO.LayDanhSachChiTietHoaDon();
        }

        public string ThemChiTietHoaDon(ChiTietHoaDonDTO cthd)
        {
            return cthdDAO.ThemChiTietHoaDon(cthd);
        }

        public string CapNhatChiTietHoaDon(ChiTietHoaDonDTO cthd)
        {
            return cthdDAO.CapNhatChiTietHoaDon(cthd);
        }

        public string XoaChiTietHoaDon(int ma)
        {
            return cthdDAO.XoaChiTietHoaDon(ma);
        }

        public List<ChiTietHoaDonDTO> LayDanhSachChiTietHoaDonTheoMaHoaDon(int ma)
        {
            return cthdDAO.LayDanhSachChiTietHoaDonTheoMaHoaDon(ma);
        }

        public void XoaChiTietHoaDonTheoMaHoaDon(int ma)
        {
            cthdDAO.XoaChiTietHoaDonTheoMaHoaDon(ma);
        }
    }
}
